package com.sunyard.manage.client;

import com.sunyard.manage.client.fallback.AuthorizationFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient(name = "authorization", fallback = AuthorizationFallBack.class)
@Component
public interface AuthorizationClient {
    @PostMapping(value = "/authorization/auth/fetchToken")
    Object fetchToken(@RequestBody Map<String, String> map);

    @PostMapping(value = "/authorization/auth/refreshToken")
    Object refreshToken(@RequestBody Map<String, String> map);

}
